Conversation
There was a problem hiding this comment.
19 issues found across 416 files
Note: This PR contains a large number of files. cubic only reviews up to 75 files per PR, so some files may not have been reviewed.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="samples/client/petstore/csharp/restsharp/net10/EnumMappings/docs/Order.md">
<violation number="1" location="samples/client/petstore/csharp/restsharp/net10/EnumMappings/docs/Order.md:2">
P3: Fix the grammar in the generated model description: `a pets` should be singular or rephrased.</violation>
</file>
<file name="samples/client/petstore/csharp/restsharp/net10/Petstore/docs/StoreApi.md">
<violation number="1" location="samples/client/petstore/csharp/restsharp/net10/Petstore/docs/StoreApi.md:259">
P3: The `GetOrderById` parameter description still says "pet" instead of "order", which misdocuments this store endpoint.</violation>
</file>
<file name="samples/client/petstore/csharp/restsharp/net10/Petstore/src/Org.OpenAPITools/Api/StoreApi.cs">
<violation number="1" location="samples/client/petstore/csharp/restsharp/net10/Petstore/src/Org.OpenAPITools/Api/StoreApi.cs:353">
P2: Forward `operationIndex` here; the synchronous wrapper currently ignores the caller's value and always uses the default request operation index.</violation>
<violation number="2" location="samples/client/petstore/csharp/restsharp/net10/Petstore/src/Org.OpenAPITools/Api/StoreApi.cs:493">
P2: Pass `operationIndex` through to `GetInventoryWithHttpInfo`; this wrapper currently ignores the supplied value.</violation>
<violation number="3" location="samples/client/petstore/csharp/restsharp/net10/Petstore/src/Org.OpenAPITools/Api/StoreApi.cs:631">
P2: This wrapper drops `operationIndex`, so synchronous `GetOrderById` calls always use the default request operation index.</violation>
<violation number="4" location="samples/client/petstore/csharp/restsharp/net10/Petstore/src/Org.OpenAPITools/Api/StoreApi.cs:766">
P2: Forward `operationIndex` in `PlaceOrder`; otherwise the synchronous wrapper always falls back to the default operation index.</violation>
</file>
<file name="samples/client/petstore/csharp/restsharp/net10/Petstore/docs/MixedNullableEnumType.md">
<violation number="1" location="samples/client/petstore/csharp/restsharp/net10/Petstore/docs/MixedNullableEnumType.md:3">
P3: Document this enum as enum values instead of an empty model properties table.</violation>
</file>
<file name="samples/client/petstore/csharp/restsharp/net10/Petstore/src/Org.OpenAPITools/Client/ApiClient.cs">
<violation number="1" location="samples/client/petstore/csharp/restsharp/net10/Petstore/src/Org.OpenAPITools/Client/ApiClient.cs:121">
P2: Use `Path.Combine` when writing downloaded stream responses; a custom `TempFolderPath` without a trailing slash produces an invalid file path.</violation>
<violation number="2" location="samples/client/petstore/csharp/restsharp/net10/Petstore/src/Org.OpenAPITools/Client/ApiClient.cs:529">
P2: `ApiResponse.Cookies` is populated twice here, so every response cookie is returned in duplicate.</violation>
<violation number="3" location="samples/client/petstore/csharp/restsharp/net10/Petstore/src/Org.OpenAPITools/Client/ApiClient.cs:576">
P2: Propagate `options.Cookies` in `ExecAsync` as well; async requests currently drop per-request cookies that the sync path sends.</violation>
</file>
<file name="samples/client/petstore/csharp/restsharp/net10/Petstore/docs/UserApi.md">
<violation number="1" location="samples/client/petstore/csharp/restsharp/net10/Petstore/docs/UserApi.md:17">
P2: This `CreateUser` section still says login is required, but the generated client and spec do not apply any authentication to `/user`.</violation>
<violation number="2" location="samples/client/petstore/csharp/restsharp/net10/Petstore/docs/UserApi.md:691">
P3: The `UpdateUser` parameter table describes `username` as a user to delete, which is incorrect for `PUT /user/{username}`.</violation>
</file>
<file name="samples/client/petstore/csharp/restsharp/net10/Petstore/README.md">
<violation number="1" location="samples/client/petstore/csharp/restsharp/net10/Petstore/README.md:18">
P2: The README currently tells users to install a RestSharp version that it also says breaks this client's file-upload APIs.</violation>
</file>
<file name="samples/client/petstore/csharp/restsharp/net10/Petstore/src/Org.OpenAPITools/Api/UserApi.cs">
<violation number="1" location="samples/client/petstore/csharp/restsharp/net10/Petstore/src/Org.OpenAPITools/Api/UserApi.cs:541">
P2: Forward `operationIndex` to the `WithHttpInfo` overload here; as written, the synchronous wrapper ignores the caller-supplied value.</violation>
</file>
<file name="samples/client/petstore/csharp/restsharp/net10/Petstore/src/Org.OpenAPITools/Api/PetApi.cs">
<violation number="1" location="samples/client/petstore/csharp/restsharp/net10/Petstore/src/Org.OpenAPITools/Api/PetApi.cs:1">
P2: Forward `operationIndex` here. As written, the synchronous wrapper ignores the caller's server-selection index and always behaves as if `0` was passed.</violation>
</file>
<file name="samples/client/petstore/csharp/restsharp/net10/Petstore/git_push.sh">
<violation number="1" location="samples/client/petstore/csharp/restsharp/net10/Petstore/git_push.sh:48">
P1: Avoid embedding `$GIT_TOKEN` in the remote URL; this writes the credential into `.git/config` in plain text.</violation>
<violation number="2" location="samples/client/petstore/csharp/restsharp/net10/Petstore/git_push.sh:53">
P2: Don't hardcode `master` here; on fresh repos whose default branch is `main`, this script fails before it can publish anything.</violation>
<violation number="3" location="samples/client/petstore/csharp/restsharp/net10/Petstore/git_push.sh:57">
P1: This pipeline masks `git push` failures, so auth or rejection errors can still leave the script with a successful exit code.</violation>
</file>
<file name="samples/client/petstore/csharp/restsharp/net10/Petstore/docs/PetApi.md">
<violation number="1" location="samples/client/petstore/csharp/restsharp/net10/Petstore/docs/PetApi.md:742">
P3: Fix the duplicated `System.IO.Stream` type markup in the upload parameter tables.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
|
|
||
| # Pushes (Forces) the changes in the local repository up to the remote repository | ||
| echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" | ||
| git push origin master 2>&1 | grep -v 'To https' |
There was a problem hiding this comment.
P1: This pipeline masks git push failures, so auth or rejection errors can still leave the script with a successful exit code.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At samples/client/petstore/csharp/restsharp/net10/Petstore/git_push.sh, line 57:
<comment>This pipeline masks `git push` failures, so auth or rejection errors can still leave the script with a successful exit code.</comment>
<file context>
@@ -0,0 +1,57 @@
+
+# Pushes (Forces) the changes in the local repository up to the remote repository
+echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
+git push origin master 2>&1 | grep -v 'To https'
</file context>
| echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." | ||
| git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git | ||
| else | ||
| git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git |
There was a problem hiding this comment.
P1: Avoid embedding $GIT_TOKEN in the remote URL; this writes the credential into .git/config in plain text.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At samples/client/petstore/csharp/restsharp/net10/Petstore/git_push.sh, line 48:
<comment>Avoid embedding `$GIT_TOKEN` in the remote URL; this writes the credential into `.git/config` in plain text.</comment>
<file context>
@@ -0,0 +1,57 @@
+ echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
+ git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
+ else
+ git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git
+ fi
+
</file context>
| /// <returns>Dictionary<string, int></returns> | ||
| public Dictionary<string, int> GetInventory(int operationIndex = 0) | ||
| { | ||
| Org.OpenAPITools.Client.ApiResponse<Dictionary<string, int>> localVarResponse = GetInventoryWithHttpInfo(); |
There was a problem hiding this comment.
P2: Pass operationIndex through to GetInventoryWithHttpInfo; this wrapper currently ignores the supplied value.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At samples/client/petstore/csharp/restsharp/net10/Petstore/src/Org.OpenAPITools/Api/StoreApi.cs, line 493:
<comment>Pass `operationIndex` through to `GetInventoryWithHttpInfo`; this wrapper currently ignores the supplied value.</comment>
<file context>
@@ -0,0 +1,907 @@
+ /// <returns>Dictionary<string, int></returns>
+ public Dictionary<string, int> GetInventory(int operationIndex = 0)
+ {
+ Org.OpenAPITools.Client.ApiResponse<Dictionary<string, int>> localVarResponse = GetInventoryWithHttpInfo();
+ return localVarResponse.Data;
+ }
</file context>
| Org.OpenAPITools.Client.ApiResponse<Dictionary<string, int>> localVarResponse = GetInventoryWithHttpInfo(); | |
| Org.OpenAPITools.Client.ApiResponse<Dictionary<string, int>> localVarResponse = GetInventoryWithHttpInfo(operationIndex); |
| /// <returns></returns> | ||
| public void DeleteOrder(string orderId, int operationIndex = 0) | ||
| { | ||
| DeleteOrderWithHttpInfo(orderId); |
There was a problem hiding this comment.
P2: Forward operationIndex here; the synchronous wrapper currently ignores the caller's value and always uses the default request operation index.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At samples/client/petstore/csharp/restsharp/net10/Petstore/src/Org.OpenAPITools/Api/StoreApi.cs, line 353:
<comment>Forward `operationIndex` here; the synchronous wrapper currently ignores the caller's value and always uses the default request operation index.</comment>
<file context>
@@ -0,0 +1,907 @@
+ /// <returns></returns>
+ public void DeleteOrder(string orderId, int operationIndex = 0)
+ {
+ DeleteOrderWithHttpInfo(orderId);
+ }
+
</file context>
| DeleteOrderWithHttpInfo(orderId); | |
| DeleteOrderWithHttpInfo(orderId, operationIndex); |
| /// <returns>Order</returns> | ||
| public Order PlaceOrder(Order order, int operationIndex = 0) | ||
| { | ||
| Org.OpenAPITools.Client.ApiResponse<Order> localVarResponse = PlaceOrderWithHttpInfo(order); |
There was a problem hiding this comment.
P2: Forward operationIndex in PlaceOrder; otherwise the synchronous wrapper always falls back to the default operation index.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At samples/client/petstore/csharp/restsharp/net10/Petstore/src/Org.OpenAPITools/Api/StoreApi.cs, line 766:
<comment>Forward `operationIndex` in `PlaceOrder`; otherwise the synchronous wrapper always falls back to the default operation index.</comment>
<file context>
@@ -0,0 +1,907 @@
+ /// <returns>Order</returns>
+ public Order PlaceOrder(Order order, int operationIndex = 0)
+ {
+ Org.OpenAPITools.Client.ApiResponse<Order> localVarResponse = PlaceOrderWithHttpInfo(order);
+ return localVarResponse.Data;
+ }
</file context>
| Org.OpenAPITools.Client.ApiResponse<Order> localVarResponse = PlaceOrderWithHttpInfo(order); | |
| Org.OpenAPITools.Client.ApiResponse<Order> localVarResponse = PlaceOrderWithHttpInfo(order, operationIndex); |
| @@ -1,4 +1,5 @@ | |||
| # Org.OpenAPITools.Model.Order | |||
| An order for a pets from the pet store | |||
There was a problem hiding this comment.
P3: Fix the grammar in the generated model description: a pets should be singular or rephrased.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At samples/client/petstore/csharp/restsharp/net10/EnumMappings/docs/Order.md, line 2:
<comment>Fix the grammar in the generated model description: `a pets` should be singular or rephrased.</comment>
<file context>
@@ -1,4 +1,5 @@
# Org.OpenAPITools.Model.Order
+An order for a pets from the pet store
## Properties
</file context>
| An order for a pets from the pet store | |
| An order for a pet from the pet store |
|
|
||
| | Name | Type | Description | Notes | | ||
| |------|------|-------------|-------| | ||
| | **orderId** | **long** | ID of pet that needs to be fetched | | |
There was a problem hiding this comment.
P3: The GetOrderById parameter description still says "pet" instead of "order", which misdocuments this store endpoint.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At samples/client/petstore/csharp/restsharp/net10/Petstore/docs/StoreApi.md, line 259:
<comment>The `GetOrderById` parameter description still says "pet" instead of "order", which misdocuments this store endpoint.</comment>
<file context>
@@ -0,0 +1,373 @@
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **orderId** | **long** | ID of pet that needs to be fetched | |
+
+### Return type
</file context>
| | **orderId** | **long** | ID of pet that needs to be fetched | | | |
| | **orderId** | **long** | ID of order that needs to be fetched | | |
| @@ -0,0 +1,9 @@ | |||
| # Org.OpenAPITools.Model.MixedNullableEnumType | |||
|
|
|||
| ## Properties | |||
There was a problem hiding this comment.
P3: Document this enum as enum values instead of an empty model properties table.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At samples/client/petstore/csharp/restsharp/net10/Petstore/docs/MixedNullableEnumType.md, line 3:
<comment>Document this enum as enum values instead of an empty model properties table.</comment>
<file context>
@@ -0,0 +1,9 @@
+# Org.OpenAPITools.Model.MixedNullableEnumType
+
+## Properties
+
+Name | Type | Description | Notes
</file context>
|
|
||
| | Name | Type | Description | Notes | | ||
| |------|------|-------------|-------| | ||
| | **username** | **string** | name that need to be deleted | | |
There was a problem hiding this comment.
P3: The UpdateUser parameter table describes username as a user to delete, which is incorrect for PUT /user/{username}.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At samples/client/petstore/csharp/restsharp/net10/Petstore/docs/UserApi.md, line 691:
<comment>The `UpdateUser` parameter table describes `username` as a user to delete, which is incorrect for `PUT /user/{username}`.</comment>
<file context>
@@ -0,0 +1,715 @@
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **username** | **string** | name that need to be deleted | |
+| **user** | [**User**](User.md) | Updated user object | |
+
</file context>
| | **username** | **string** | name that need to be deleted | | | |
| | **username** | **string** | name of user to be updated | | |
| @@ -0,0 +1,860 @@ | |||
| # Org.OpenAPITools.Api.PetApi | |||
There was a problem hiding this comment.
P3: Fix the duplicated System.IO.Stream type markup in the upload parameter tables.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At samples/client/petstore/csharp/restsharp/net10/Petstore/docs/PetApi.md, line 742:
<comment>Fix the duplicated `System.IO.Stream` type markup in the upload parameter tables.</comment>
<file context>
@@ -0,0 +1,860 @@
+|------|------|-------------|-------|
+| **petId** | **long** | ID of pet to update | |
+| **additionalMetadata** | **string?** | Additional data to pass to server | [optional] |
+| **file** | **System.IO.Stream?****System.IO.Stream?** | file to upload | [optional] |
+
+### Return type
</file context>
PR checklist
Commit all changed files.
This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
These must match the expectations made by your contribution.
You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example
./bin/generate-samples.sh bin/configs/java*.IMPORTANT: Do NOT purge/delete any folders/files (e.g. tests) when regenerating the samples as manually written tests may be removed.
master(upcoming7.x.0minor release - breaking changes with fallbacks),8.0.x(breaking changes without fallbacks)"fixes #123"present in the PR description)Summary by cubic
Split the .NET 10 C#
restsharpPetstore samples: added a newPetstoresample generated from the localhost test spec and a dedicatedEnumMappingssample using the standard Petstore spec to validateenumNameMappings. Also added CI to build the new sample and refreshed generated APIs/docs (base URLs, return types, params, and auth examples).Refactors
Petstoreatsamples/client/petstore/csharp/restsharp/net10/Petstorefrom...oneof-primitive-types-localhost.yamlwith basehttp://localhost/v2; generateEnumMappingsat.../EnumMappingsfrompetstore.yamlusingenumNameMappings(delivered→Shipped) with basehttp://petstore.swagger.io/v2.PetApi.AddPetnow returnsPet; removedUploadFileWithRequiredFile; renamed Store path paramorder_id→orderId; added API key handling onUserApi.CreateUser; pruned test-only endpoints/models and HTTP-signing artifacts inEnumMappings; refreshedopenapi.yaml, model descriptions, and READMEs.New Features
samples-dotnet-petstore-net10.ymlto build and test thePetstoresample on.NET 10.Written for commit 35fdc30. Summary will update on new commits.